home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tool-inc.zip / REVERSE.INC < prev    next >
Text File  |  1989-03-01  |  678b  |  30 lines

  1.  
  2. (*
  3.  * Copyright 1987, 1989 Samuel H. Smith;  All rights reserved
  4.  *
  5.  * This is a component of the ProDoor System.
  6.  * Do not distribute modified versions without my permission.
  7.  * Do not remove or alter this notice or any other copyright notice.
  8.  * If you use this in your own program you must distribute source code.
  9.  * Do not use any of this in a commercial product.
  10.  *
  11.  *)
  12.  
  13. (*
  14.  * reverse_string - return a string with all characters reversed
  15.  *
  16.  *)
  17.  
  18. function reverse_string(str: anystring): anystring;
  19. var
  20.    i: integer;
  21.    r: anystring;
  22. begin
  23.    r := '';
  24.    for i := length(str) downto 1 do
  25.       r := r + str[i];
  26.  
  27.    reverse_string := r;
  28. end;
  29.  
  30.